package com.example.spring.activemq.jms.vo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class ExceptionInfoType extends RuntimeException {
    private static final Logger log = LoggerFactory.getLogger(ExceptionInfoType.class);
    private static final long serialVersionUID = 1L;
    private String code;
    private String msg;

    public ExceptionInfoType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return this.msg;
    }

    public String getCode() {
        return this.code;
    }

    public static ExceptionInfoType getIntance(EnumInfoType eit, String msg) {
        return ExceptionBusiness.getIntance(eit, msg);
    }

    public static ExceptionInfoType getIntance(EnumInfoType eit) {
        return ExceptionBusiness.getIntance(eit, "");
    }

    public static ExceptionInfoType getIntance() {
        return ExceptionBusiness.getIntance();
    }
}
